﻿/*
 * DebugStream.h
 *
 *  Created on: 2011/05/29
 *      Author: naoki
 */

#ifndef INCLUDED_NTENGINE_DEBUGSTREAM_H
#define INCLUDED_NTENGINE_DEBUGSTREAM_H

#include <string>

namespace NTEngine {

using namespace std;
class OStringStream;

/**
 * @brief デバッグ出力ストリーム
 */
class DebugStream {
public:
	DebugStream();
	int precision( int );
	DebugStream& operator<<( char );
	DebugStream& operator<<( unsigned char );
	DebugStream& operator<<( int );
	DebugStream& operator<<( unsigned );
	DebugStream& operator<<( short );
	DebugStream& operator<<( unsigned short );
	DebugStream& operator<<( float );
	DebugStream& operator<<( double );
	DebugStream& operator<<( const string& );
	DebugStream& operator<<( const char* );
	DebugStream& operator<<( char* );
	DebugStream& operator<<( const OStringStream& );
	DebugStream& operator<<( DebugStream& ( *f )( DebugStream& ) );
	DebugStream& endl();
	DebugStream& hex();
	DebugStream& dec();
	void begin();
	void end();
private:
	class Impl;
	Impl* m_Impl;
};

DebugStream& endl( DebugStream& );
DebugStream& hex( DebugStream& );
DebugStream& dec( DebugStream& );
extern DebugStream cout;

}

#endif // INCLUDED_NTENGINE_DEBUGSTREAM_H
